<html lang="zh-CN"><head>
<title>收货地址</title>
<meta charset="UTF-8">
<meta name="viewport" content=" initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/zepto.1.1.3.min.js{$Think.config.RESOURCE_VER}"></script>
<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/product/product.js{$Think.config.RESOURCE_VER}"></script>
<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/util.js{$Think.config.RESOURCE_VER}"></script>
<link rel="stylesheet" href="{$Think.config.RESOURCEURL}wx_assets/css/product/ordercommit1.css{$Think.config.RESOURCE_VER}" />
<link rel="stylesheet" href="{$Think.config.RESOURCEURL}wx_assets/css/product/ordercommit2.css{$Think.config.RESOURCE_VER}" />
</head>
<body>

<notempty name="headerTpl">
	<include file="$headerTpl" />
</notempty>

<input type="hidden" id="isUpdate" name="isUpdate" value="-1">
<input type="hidden" id="oprTip" name="oprTip" value="0">
<input type="hidden" id="provId" name="provId" value="-1">
<form class="js-address-fm address-ui address-fm">
<div class="lay_page page_address_add" id="page_address_add">
	<div class="block" style="margin-bottom:10px;">
		<input type="hidden" name="id" value="" />
		<div class="block-item">
			<label class="form-row form-text-row">
				<em class="form-text-label">收货人</em>
				           <span class="input-wrapper">
			<input type="text" id="name" name="editAddress.name" class="form-text-input" value="{$fullName}" placeholder="名字" /></span>
			</label>
		</div>
		<div class="block-item">
			<label class="form-row form-text-row">
				<em class="form-text-label">联系电话</em>
				  <span class="input-wrapper">
			<input type="tel" id="mobile" name="editAddress.mobile" class="form-text-input" value="{$phone}" placeholder="手机或固话" /></span>
			</label>
		</div>
		<div class="block-item">
			<label class="form-row form-text-row">
				<em class="form-text-label">详细地址</em>
			<textarea id="address">{$address}</textarea>
			</label>
		</div>
	</div>
	<div class="action-container">
		<a href="#" id="save_addr" class="js-address-save btn btn-block btn-blue">保存</a>
		<a href="javascript:history.go(-1);" class="js-address-cancel btn btn-block">取消</a>
	</div>
</div>
	</form>
<notempty name="footerTpl">
	<include file="$footerTpl"/>
</notempty>
<script>
var hrefParamsArray = GetSessionIdFromHref(window.location.search);
hrefParamsArray["userName"]='{$userName}';
function GetSessionIdFromHref(search){
　　	var args = search.substring(1); 
　　	var retval = new Array(); 
	args = args.split("&"); 
		for(var i = 0; i < args.length; i ++){ 
			str = args[i]; 
			var arg = str.split("="); 
			if(arg.length <= 1) continue; 
			
			if(arg[0] == 'params') {
				var params = decodeURIComponent(arg[1]);
				var obj = eval('(' + params + ')');
				if (obj.rootid != undefined) {
					retval["rootid"] = obj.rootid;
				}
				if (obj.orderId != undefined) {
					retval["oid"] = obj.orderId;
				}
				if (obj.ptype != undefined) {
					retval["ptype"] = obj.ptype;
				}
				if (obj.dtype != undefined) {
					retval["dtype"] = obj.dtype;
				}
				if (obj.tplid != undefined) {
					retval["tplid"] = obj.tplid;
				}
			} else if(arg[0] == 'customerId') {
				retval["customerId"] = arg[1]; 
			}else if(arg[0] == 'userName'){
				retval["userName"] = arg[1]; 
			}
		} 
		return retval; 
}

var hrefPath = 'call.html?customerId='+ hrefParamsArray["customerId"];
var basePath = 'call.json?customerId='+ hrefParamsArray["customerId"]+'&userName={$userName}';
var rootId = hrefParamsArray["rootid"] == undefined ? '' : ',"rootid":' + hrefParamsArray["rootid"];
var tplid = hrefParamsArray["tplid"];
var preOid = hrefParamsArray["oid"];
var ptype = hrefParamsArray["ptype"]  == undefined ? '' : ',"ptype":"' + hrefParamsArray["ptype"] + '"';
var dtype = hrefParamsArray["dtype"]  == undefined ? '' : ',"dtype":"' + hrefParamsArray["dtype"] + '"';
</script>
    <script type="text/javascript">
        mi.PRODUCT_ADDRESS.init();
    </script>
</body></html>